﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Shapes;

namespace TimeSolve
{
    public class MonitorItem : BindableBase
    {
        public string name { get => _name; set { _name = value; RaisePropertyChanged("name"); } }
        private string _name;
        public bool isCanchaCurve { get => _isCanchaCurve; set => _isCanchaCurve = value; }
        private bool _isCanchaCurve = false;
        public string xAxisName { get => _xAxisName; set { _xAxisName = value; RaisePropertyChanged("xAxisName"); } }
        private string _xAxisName;
        public string yAxisName { get => _yAxisName; set { _yAxisName = value; RaisePropertyChanged("yAxisName"); } }
        private string _yAxisName;
        public Int32Collection xValues { get; set; } = new Int32Collection();
        public ObservableCollection<Data> datas { get; set; } = new ObservableCollection<Data>();

        public double minX { get => _minX; set { _minX = value; } }
        private double _minX;
        public double minY { get => _minY; set { _minY = value; } }
        private double _minY;
        public double maxX { get => _maxX; set { _maxX = value; } }
        private double _maxX;
        public double maxY { get => _maxY; set { _maxY = value; } }
        private double _maxY;


        public class Data : BindableBase
        {
            public string dataName { get => _dataName; set { _dataName = value; RaisePropertyChanged("dataName"); } }
            private string _dataName;
            public Brush dataBrush { get => _dataBrush; set => _dataBrush = value; }
            private Brush _dataBrush;
            public string latestValue { get => _latestValue; set { _latestValue = value; RaisePropertyChanged("latestValue"); } }
            private string _latestValue;
            public DoubleCollection yValues { get; set; } = new DoubleCollection();
        }
    }
}
